<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>缩放</title>
    <style>
        .box{
            width: 200px;
            height: 200px;
            margin: 100px auto;
            background-color: pink;
        }
        .box img{
            width: 100%;
            height: 100%;
            /* 过渡效果 */
            transition: all .5s;
        }
        .box:hover img{
            /* scale缩小和放大倍数 不需要单位 */
            transform: scale(.5);
        }

    </style>
</head>
<body>

    <!-- scale大于1放大   scale小于1表示缩小  为负值缩到没有到图片反过来 -->
    <div class="box">
        <img src="./images/product.jpg" alt="">
    </div>
</body>
</html>